﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Data;


namespace Forum.Entity.Member
{
    public partial class MemberBaseInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "MemberBase";
        }
        public override string GetInsertSql()
        {
            return "insert into MemberBase ( [ID], [Name], [LoginName], [Password], [Mobile], [Email], [State]) values ( @ID, @Name, @LoginName, @Password, @Mobile, @Email, @State)";
        }
        public override string GetUpdateSql()
        {
            return "update MemberBase set  [ID] = @ID, [Name] = @Name, [LoginName] = @LoginName, [Password] = @Password, [Mobile] = @Mobile, [Email] = @Email, [State] = @State where ID = @ID";
        }
        /// <summary>
        /// 
        /// </summary>
        public Int32 ID
        {
            get;
            set;
        }
        /// <summary>
        /// 昵称
        /// </summary>
        public String Name
        {
            get;
            set;
        }
        /// <summary>
        /// 登录名
        /// </summary>
        public String LoginName
        {
            get;
            set;
        }
        /// <summary>
        /// 密码
        /// </summary>
        public String Password
        {
            get;
            set;
        }
        /// <summary>
        /// 手机
        /// </summary>
        public String Mobile
        {
            get;
            set;
        }
        /// <summary>
        /// 邮件
        /// </summary>
        public String Email
        {
            get;
            set;
        }
        /// <summary>
        /// 状态(枚举)
        /// </summary>
        public Int32 State
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "name":
                    this.Name = (String)value;
                    break;
                case "loginname":
                    this.LoginName = (String)value;
                    break;
                case "password":
                    this.Password = (String)value;
                    break;
                case "mobile":
                    this.Mobile = (String)value;
                    break;
                case "email":
                    this.Email = (String)value;
                    break;
                case "state":
                    this.State = (Int32)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "name":
                    return this.Name;
                case "loginname":
                    return this.LoginName;
                case "password":
                    return this.Password;
                case "mobile":
                    return this.Mobile;
                case "email":
                    return this.Email;
                case "state":
                    return this.State;
                default:
                    return null;
            }
        }
    }

}
